<template>
    <page class="c1528882775881">
        <div class="white-bg">
            <div class="tc">
                <icon class="py36" type="success" is-msg></icon>
                <p class="f20">支付成功</p>
            </div>
            <group gutter="0" class="mt40">
                <cell-form-preview :list="list"></cell-form-preview>
                <div class="mb10"></div>
            </group>
        </div>
        <m-button class="bg3 mt40 mx12 mb60" v-back="'user'" @click.native="onClick">完成</m-button>
    </page>
</template>
<script>
  import Vue from 'vue'
  import couponPop from '@/pages/收到优惠券弹窗'

  export default {
    data () {
      return {
        obj: {}
      }
    },
    async created () {
      const {obj} = await this.$get('shift/getShiftDetailById', {id: this.$route.query.id})
      this.obj = obj
    },
    computed: {
      list () {
        const {payDate, discount, shopName, payMoney, orderCode, oilCode, gunCode, getIntegral} = this.obj
        return [{
          label: '收款商家',
          value: shopName
        }, {
          label: '油品类型',
          value: oilCode
        }, {
          label: '加油抢号',
          value: gunCode
        }, {
          label: '实际支付',
          value: `<span class="c1">${payMoney / 100 }元</span>`
        }, {
          label: '优惠金额',
          value: `<span class="c7">${discount / 100}元</span>`
        }, {
          label: '获得积分',
          value: `<span class="c6">${getIntegral}个</span>`
        }, {
          label: '交易时间',
          value: Vue.filter('dateFormat')(payDate)
        }, {
          label: '订单编号',
          value: orderCode
        }, {
          label: '当前状态',
          value: '交易完成'
        }]
      }
    },
    methods: {
      onClick () {
        couponPop()
      }
    },
    components: {}
  }
</script>
<style type="text/scss" lang="scss">
    .c1528882775881 {
        .weui-cells.vux-no-group-title:before {
            display: none !important;
        }
    }
</style>
<style type="text/scss" lang="scss" scoped>

</style>
